<div class="choose-person-plugin" data-ng-controller="ChoosePersonCtrl">
    <div class="modal-head"><span class="mod-title">选择{{what2}}</span></div>
    <section class="modal-lr">
        <div class="modal-l">
            <div class="modal-search no-item">
                <div class="dem-item-wrap">
                    <ul class="sel-dpm-item">
                        <li class="sel-item">研发部</li>
                        <li class="sel-item">产品部</li>
                        <li class="sel-item">资源部</li>
                        <li class="sel-item">运营部</li>
                    </ul>
                </div>
                <div class="search-wrap">
                    <span class="fadajing fa fa-search text-large"></span> 
                    <input type="text" placeholder="搜索{{what1}}"  onfocus="select()" data-ng-model="depQuery.kw" data-ng-keypress="checkSearchDep($event)">
                    <a href="javascript:;" class="chosePer-icon chosePer-close input-close" data-ng-if="depQuery.kw" data-ng-click="depQuery.kw = null">
                        <i class="fa fa-times"></i>
                    </a>
                </div>
            </div>
            <div class="tree department-tree">
                <div class="chosePer-warning-p"><i class="chosePer-icon chosePer-warning"></i> <span class="ver-bottom">当前{{what1}}不可选择</span>
                </div>
                <span class="clearSearch" data-ng-if="isSearchDep" data-ng-click="cancelSearchDep()">清除搜索 <i class="fa fa-times"></i></span>
                <div class="padding-15">
                    <div class="dd">
                        <ol class="dd-list" ng-include="'app/plugins/choose-person-page-node.html'">
                        </ol>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal-r">
            <div class="personnal-search" data-ng-class="{'no-item':selectedMembers.length==0}">
                <div class="ps-special-wrap">
                    <div class="chosePer-warning-p"><i class="chosePer-icon chosePer-warning"></i> <span
                            class="ver-bottom">当前{{what2}}不可选择</span></div>
                </div>
                <div class="per-item-Wrap">
                    <ul class="sel-dpm-item">
                        <li class="sel-item" data-ng-repeat="sm in selectedMembers">
                            <span class="sel-personal-name ellipsis">{{sm.u_username}}</span>
                            <a href="javascript:;" class="sel-item-del chosePer-icon chosePer-delete fa fa-times" data-ng-click="deleteMember($index)"></a>
                        </li>
                    </ul>
                </div>
                <div class="search-wrap">
                    <span class="fadajing fa fa-search text-large"></span> 
                    <input type="text" placeholder="搜索{{what2}}" onfocus="select()" data-ng-model="memberQuery.kw" data-ng-keypress="checkSearchMember($event)">
                    <a href="javascript:;" class="chosePer-icon chosePer-close input-close"
                       data-ng-if="memberQuery.kw" data-ng-click="cancelSearchMember()"></a>
                </div>
            </div>
            <div class="chosePer-options" data-ng-show="members.length > 0 && !singleSelect">
                <a href="javascript:void(0);" class="chosePer-fn" data-ng-click="selectAll()">全选</a>
                <a href="javascript:void(0);" class="chosePer-fn" data-ng-click="selectReverse()">反选</a> 
                <a href="javascript:void(0);" class="chosePer-fn" data-ng-click="cancelAll()">清空</a>
            </div>
            <div class="personnal-avatar-wrap">
                <div class="per-list-wrap" data-ng-if="noMembers"><h3>没有{{what2}}</h3></div>
                <div class="per-list-wrap" data-ng-if="!noMembers">
                    <ul class="personnal-list">
                        <li class="personnal-item" title="{{member.u_username}}"
                            data-ng-class="{'check':member.selected, 'disable':false}"
                            data-ng-click="clickMembers($index)" data-ng-repeat="member in members">
                            <div class="per-avatar"><img data-ng-src="{{member.ui_avatar}}">
                                <div class="isChecked" data-ng-if="member.selected"><i class="checked"></i></div>
                            </div>
                            <span class="per-name ellipsis" data-ng-bind="member.u_username"></span></li>
                    </ul>
                    <div class="load-more" data-ng-if="hasMore" data-ng-click="moreMembers()">
                        <a href="javascript:void(0);">加载更多...</a>
                    </div>
                </div>
            </div>
            <div class="per-btnGroup">
                <a href="javascript:void(0);" class="btn btn-primary" data-ng-click="OK()">确定</a>
                <a href="javascript:void(0);" class="btn btn-cancel" data-ng-click="doCancel()">取消</a> 
            </div>
        </div>
    </section>
</div>
<script type="text/ng-template" id="app/plugins/choose-person-page-node.html">
    <li class="dd-item" data-ng-repeat="dep in departmentList">
        <button data-action="{{!!dep.isOpen ? 'collapse':'expand'}}" type="button" data-ng-click="toggleDep(dep.de_wxid)" data-ng-if="!dep.noChild">Collapse</button>
        <div class="dd-handle" data-ng-class="{'active':!!dep.isRoot}" data-ng-bind="dep.de_name" data-ng-click="clickDepartment(dep.de_wxid)"></div>
        <ol class="dd-list"  data-ng-class="{'no-display':!dep.isOpen}" ng-if="dep.sub.length" ng-include="'app/plugins/choose-person-page-node.html'"  ng-init="departmentList=dep.sub"></ol>
    </li>
</script>